package com.gexiaobao.pigeon.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.gexiaobao.pigeon.R
import com.gexiaobao.pigeon.app.base.DataBindBaseViewHolder
import com.gexiaobao.pigeon.app.model.bean.GoodsDetailResponse
import com.gexiaobao.pigeon.databinding.ItemGoodsBinding
import com.gexiaobao.pigeon.databinding.ItemProductIntroduceBinding

/**
 * @author:hxw
 * @date  :2023/2/2
 * @desc  :
 */
class ProductIntroduceAdapter(data: ArrayList<GoodsDetailResponse.Deses>) :
    BaseQuickAdapter<GoodsDetailResponse.Deses, DataBindBaseViewHolder>(R.layout.item_product_introduce, data) {

    override fun convert(holder: DataBindBaseViewHolder, item: GoodsDetailResponse.Deses) {
        val binding = DataBindBaseViewHolder.getBinding(holder) as ItemProductIntroduceBinding
        binding.data = item
        binding.executePendingBindings()//防止列表抖动
    }
}